package sunny.com.girlname;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/hello")
public class HelloController {

    @Autowired
    private GirlProperties girlProperties;

    //@RequestMapping(value = {"/hello","/hi"}, method = RequestMethod.GET)
    //@RequestMapping(value = "/say", method = RequestMethod.GET)
    //public String say() {
    @RequestMapping(value = "/say", method = RequestMethod.GET)
    //public String say(@PathVariable("id") Integer myId) {
    public String say(@RequestParam(value = "id",required = false,defaultValue = "0") Integer myId) {
        return "id: " + myId;
    }
}